from selenium import webdriver
import time
import pandas as pd
from openpyxl import Workbook
df = pd.read_excel("./python入门/个人整活/text.xlsx", header=None)
urls = df[0].tolist()

for i in range(len(urls)):
    driver = webdriver.Firefox()
    driver.get(urls[i])
    time.sleep(2)
    try:
        driver.get_screenshot_as_file(
            "./python入门/个人整活/test_1/{}.png".format(i+1))
    except BaseException as msg:
        print(msg)

    driver.quit()
